<ion-content>
  <input type="file" #input accept='video/mp4, audio/mp3' (change)="sharemedia.fileChange($event)" hidden/>
  <div id="sharemedia">
    <ng-container *ngFor="let stream of peer.mediaStreams">
      <video [srcObject]="stream" autoplay playsinline></video>
    </ng-container>
  </div>

  <ng-container *ngIf="profile.privilege.shareMedia && !peer.mediaStreams.length">
    <ion-fab vertical="center" horizontal="center" slot="fixed" *ngIf="!sharemedia.videoElement">
      <ion-fab-button (click)="input.click()">
        <ion-icon name="add"></ion-icon>
      </ion-fab-button>
    </ion-fab>
    <ion-fab vertical="center" horizontal="end" slot="fixed" *ngIf="sharemedia.videoElement">
      <ion-fab-button (click)="sharemedia.close()">
        <ion-icon name="close"></ion-icon>
      </ion-fab-button>
    </ion-fab>
  </ng-container>
</ion-content>